home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Powervisor v1.10b disk2.adf / Help.doc < prev    next >
Text File  |  1991-08-07  |  19KB  |  471 lines

  1. ==============================================================================
  2.  
  3.         Quick HELP                      V2.0
  4.         © J.Tyberghein                  Mon Oct 15 11:29:21 1990
  5.  
  6. ==============================================================================
  7.  
  8.  
  9.  
  10. Preface
  11. -------
  12.   These programs are intended for everyone. They are extremely useful
  13.   if you are, for example, a programmer and you have some help-files.
  14.  
  15.   Suppose that you want to know the syntax of the EXEC AllocMem command.
  16.   Normally you would start an editor (or use the one which is already in
  17.   memory) and load the corresponding help-file. (You can of course 'type'
  18.   them, but this can be very timeconsuming if the help-file is big)
  19.   Then you must search the right entry in this help-file.
  20.   This may look easy to you, but sometimes it's just difficult enough to
  21.   refrain you from using such help-files.
  22.  
  23.   These three utilites (MakeHelp, Help and ArcFiles) allow you to
  24.   make your own help-files. When this is done you simply type
  25.   'Help AllocMem' and there comes your information !
  26.  
  27.   To guarantee maximum flexibility these programs are able to read files
  28.   crunched with the PowerPacker (Author Nico François).
  29.   You can crunch each help-file individually and then archive them in
  30.   one big file. The advantage of this is that the resulting file will
  31.   be smaller than the sum of the original files (although a bit bigger
  32.   than if you had crunched them all together), but it will only be necessary
  33.   to decrunch the individual files when needed (of course this will be
  34.   done automatically for you).
  35.   To guarantee an even greater amount of flexibility you can show the
  36.   information you want in every editor you like. (The ouput will be
  37.   put in a temporary file and the editor will automatically be
  38.   invoked with this file)
  39.   And in case you have PPMore (also by Nico François), the biggest
  40.   amount of flexibility is likely to be yours. For in that case there
  41.   is no additional overhead for using a temporary file.
  42.  
  43.   These programs (Help, MakeHelp and ArcFiles V2.0) are public domain but
  44.   contributions and some utilities are always welcome.
  45.   If you want to use any of these programs for commercial purposes please
  46.   write for permission !
  47.  
  48.   If you have any suggestions or remarks you can write to (Bug reports are
  49.   welcome too)
  50.  
  51.                             Jorrit  Tyberghein
  52.                              Hepmansbossen 31
  53.                            2450 Meerhout BELGIUM
  54.  
  55.  
  56.  
  57.   WARNING:
  58.     If you want to use this utilities you must have AmigaDOS 2.0 (or later
  59.     :-).
  60.     If you want to use the MEMORY option with PPMore (explained later) you
  61.     need PPMore version 1.3 or later.
  62.     These programs accept crunched DATA-files made by PowerPacker 1.1 or
  63.     later.
  64.     Only use Help, MakeHelp and ArcFiles if they have the same
  65.     version number (unless stated otherwise).
  66.     If you use the PROG option (in HELP), you must assign T:.
  67.     All this utilities are pure, so you can use them with 'Resident'.
  68.  
  69.  
  70.   At the end of this document you find a simple example.
  71.  
  72.  
  73. New in QuickHelp V2.0
  74. ---------------------
  75.  
  76.   ARP dependancy is removed
  77.   AmigaDOS 2.0
  78.   Made pure
  79.   New LIST option in Help
  80.  
  81.  
  82. ArcFiles
  83. --------
  84.  
  85.   +---------------------------------------------+
  86.   | Commandline template:                       |
  87.   |   Files/m,TO=ARC/a,ADD/s,LIST/s:            |
  88.   |---------------------------------------------|
  89.   | Usage:                                      |
  90.   |   ArcFiles { <Files>... } <TO Dest> [ADD]   |
  91.   | or                                          |
  92.   |   ArcFiles <ARC Dest> LIST                  |
  93.   +---------------------------------------------+
  94.  
  95.   This program is a small archiver. It is made especially for the
  96.   help utilities. You can use it for your own purposes if you like
  97.   (but not commercially).
  98.   At the moment it is not possible to extract files. This will of course
  99.   be possible in future releases.
  100.  
  101.     <Files>      : files to archive
  102.                    you can use all AmigaDOS wildcards
  103.                    (see the DOS documentation for more information)
  104.     <Dest>       : this is the destination for the archive
  105.     ADD          : if this option is used the <Files> will be appended
  106.                    to an existing archive <Dest>
  107.     LIST         : generate a listing of this archive
  108.                    if this option is specified <Dest> must be an
  109.                    existing archive file
  110.  
  111.  
  112.   examples:
  113.  
  114.     ArcFiles dh0:docs/#?.docs to dh0:DocArc.ppa
  115.       will archive all files in 'dh0:docs' with extension '.docs' in the file
  116.       'dh0:DocArc.ppa'. If this destination file was there already it
  117.       will be deleted.
  118.  
  119.     ArcFiles dh0:docs/#?.docs to dh0:DocArc.ppa add
  120.       will add the files in 'dh0:docs' with extension '.docs' to the
  121.       existing archive file dh0:DocArc.ppa
  122.  
  123.     ArcFiles arc dh0:DocArc.ppa list
  124.       will generate a listing of all the files in 'dh0:DocArc.ppa'.
  125.  
  126.     ArcFiles dh0:docs/Exec.doc df0:sources/#?.c to df0:ExecAndSources.ppa
  127.       will archive the file 'dh0:docs/Exec.doc' and all files in
  128.       'df0:sources' with extension '.c' in 'df0:ExecAndSources.ppa'.
  129.       Note that ArcFiles will give no warning if 'dh0:docs/Exec.doc'
  130.       does not exist. It will simply not archive it (rather obvious
  131.       isn't it ?).
  132.  
  133.   Arc format (V1.2, format has not changed since V1.2):
  134.  
  135.     I will give a description of the Arc format, so you can use it for
  136.     your own purposes.
  137.  
  138.     The file starts with two longwords. The first is equal to 'PPA1'.
  139.     The second is the offset in the file to where the Archive descriptor
  140.     table is located.
  141.     After these two longwords the files begin.
  142.     The archive descriptor (at the end of the file) contains the following:
  143.       A null terminated string  : the name and path name of the sub-file
  144.       A long word indicating the offset of the sub-file in this archive
  145.       A long word indicating the length of the sub-file
  146.     And this is repeated for every sub-file in the archive.
  147.     Simply check for EOF to stop scanning.
  148.  
  149.  
  150. MakeHelp
  151. --------
  152.  
  153.   +---------------------------------------------+
  154.   | Commandline template:                       |
  155.   |   From,CtrlFile,ADD/s,WORD/n,CLASS/k:       |
  156.   |---------------------------------------------|
  157.   | Usage:                                      |
  158.   |   MakeHelp <Help file> <Ctrl file> [ADD]    |
  159.   |            [WORD num] [CLASS class]         |
  160.   +---------------------------------------------+
  161.  
  162.   This program makes the help control files for you. These control
  163.   files are plain ASCII so you can add or delete lines as you wish.
  164.  
  165.     <Help file>   : the file containing the help (in a special format,
  166.                     explained below)
  167.     <Ctrl file>   : the control file to make or to adjust
  168.     ADD           : specify this option if you want to add help items
  169.                     to the control file (adjusting)
  170.     WORD num      : normally the parser searches for the first word in
  171.                     the text. This word will be the keyword for you to
  172.                     use with the help utility (see below for an example).
  173.                     With this option you can specify which word you want
  174.                     as the keyword
  175.     CLASS class   : to make the Quick Help utilities more flexible, you
  176.                     can group your help items in classes. When you use
  177.                     this option the newly added help items will be of
  178.                     class <class>. If you omit this option they will have
  179.                     class 'Misc' (from miscellaneous).
  180.  
  181.   The help-file must have the following format:
  182.  
  183.     If the help-file is a crunched or normal file:
  184.  
  185.       When you place a marker ('@') in the beginning of a line, MakeHelp
  186.       will search for the next (depending on the WORD option) word and
  187.       will start a new help item entry here. This word is then the keyword
  188.       for the Help utility.
  189.       This marker is not necessary in the beginning of the file.
  190.       At the end of the help text for this item you place '===' in the
  191.       beginning of the line. This is not necessary at the end of the file.
  192.  
  193.     If the help-file is an archive (each individual file may
  194.     be crunched):
  195.  
  196.       If each individual file in the help-file corresponds with one help
  197.       item, you need not place markers. The items are selected automatically.
  198.       In fact you can think about each individual file as a real file.
  199.       With this in your mind you can reread the previous paragraph.
  200.       If there are multiple help items in each individual file you must
  201.       place the corresponding markers (read the previous paragraph for
  202.       for more information)
  203.  
  204.   examples:
  205.  
  206.     MakeHelp dh0:docs/exec.ppa s:help.file
  207.       will make a new file 's:help.file' and add all marked help items in
  208.       the archive file 'dh0:docs/exec.ppa'. If every individual file in
  209.       the archive corresponds with one help-item, no markers are needed.
  210.  
  211.     MakeHelp dh0:docs/arexx.doc s:help.file add
  212.       will add all marked help items in the normal file 'dh0:docs/arexx.doc'
  213.       to 's:help.file'. The file 's:help.file' must already exist.
  214.  
  215.     MakeHelp dh0:docs/arexx.doc s:help.file add word 2
  216.       same as previous but we now take the second word after the marker '@'
  217.       as our keyword.
  218.  
  219.     MakeHelp dh0:docs/exec.ppa s:help.file class exec
  220.       same as the first example, but now the items will have class 'exec'
  221.       instead of 'Misc'.
  222.  
  223.   Control file format (V1.2, format has not changed since V1.2):
  224.  
  225.     There are two possible lines in a control file: an option line or
  226.     a normal line.
  227.     - An option line starts with '#'. The following options are supported:
  228.           PROG prog
  229.             When Help selects a help item after this option, the help text
  230.             will be directed to the program 'prog' (most likely an editor).
  231.             While prog is executing you can find the help text in the
  232.             file t:HelpTemp.
  233.           MEMORY prog
  234.             Same as previous option, but now there is no temporary file
  235.             needed. The help text is loaded directly in memory. At the moment
  236.             only PPMore (version 1.3 and later) supports this option (MEMORY
  237.             PPMore), but you can write your own programs to support this option
  238.             if you like. You could, for example, use this option to make an
  239.             efficient ARexx interface.
  240.             When prog is executed it will have the following argument line:
  241.               -@<Hex address memory>,<Hex length>,<Hex options>,<Title string>
  242.             The first three hex integers are all longwords.
  243.             If the first bit (bit 0) of the last hex integer (Hex options) is
  244.             1, you must free the memory when you are ready (With Help this
  245.             is always the case).
  246.             for example:
  247.               -@C02310,12C0,1,Title
  248.               must be interpreted as:
  249.                 on address 0xC02310 you find my text. It is 0x12C0 bytes long
  250.                 and you must free it after you are ready. The title is
  251.                 'Title'.
  252.           RUN
  253.             Use this option if you want to run <prog> (from MEMORY or PROG)
  254.             instead of executing. (executing is the default)
  255.           NORUN
  256.             Use this option if you want to execute <prog>. (default)
  257.           STDO
  258.             When this option is used, the help text will go to the
  259.             standard Output (the CLI window).
  260.             This option overrides PROG and MEMORY and is the default.
  261.           CLASS <class>
  262.             All following help items will be of class <class>.
  263.           FILE <file>
  264.             Default file for help text (explained below).
  265.     - All other lines are help item lines.
  266.         They have the following format:
  267.           <KeyWord> '|' <File> or '*' '|' <Offset> [ '|' <individual file> ]
  268.           <KeyWord> is obvious.
  269.           <File> is the file where the help text can be found.
  270.             If <File> is a '*' the current file is taken (FILE option).
  271.           <Offset> is the offset in the file where the help text starts
  272.             if the file is not archived, and the offset in the individual
  273.             file if the file is archived.
  274.           <individual file> (only for archived files) is the individual
  275.             file where the help text can be found.
  276.         This control file format implies that:
  277.           - If you change the help-file you must change the control file,
  278.             because some offsets could change.
  279.           - If you add individual files to the help-file (an archive file in
  280.             this case) you need not change the offsets because the offsets are
  281.             relative in the individual files, and you only add another
  282.             individual file.
  283.           - If a help-file is not an archive you may freely crunch or
  284.             decrunch this file (with PowerPacker), because the offsets will
  285.             not change
  286.             (the offsets are always the offsets in the decrunched file).
  287.           - Crunched archive files are not supported (and not very useful).
  288.           - If you rename the help-file, you must change the corresponding
  289.             FILE option in the control file.
  290.  
  291.  
  292. Help
  293. ----
  294.  
  295.   +-----------------------------------------------------------------+
  296.   | Commandline template:                                           |
  297.   |   Name/a,CtrlFile,RUN/s,NORUN/s,MEMORY/k,PROG/k,STDO/s,LIST/s:  |
  298.   |-----------------------------------------------------------------|
  299.   | Usage:                                                          |
  300.   |   Help [<Class>,]<Name> [<File>] [RUN | NORUN]                  |
  301.   |        [STDO | (MEMORY | PROG) prog] [LIST]                     |
  302.   +-----------------------------------------------------------------+
  303.  
  304.   This utility gives you the help you want.
  305.  
  306.     <Name>        : this is the help item you want help about
  307.                     You will get the first corresponding help item
  308.                     HELP finds.
  309.                     Note that it is not necessary to give the full
  310.                     help item name. Case is not important either.
  311.                     You can use wildcars in <Name>.
  312.     <Class>       : if <Class> is specified HELP will look for the
  313.                     help item in this Class.
  314.                     Note that it is not necessary to give the full
  315.                     class name. Case is not important.
  316.     <File>        : control file (made by MakeHelp). 's:help.file' is
  317.                     the default.
  318.     RUN NORUN STDO MEMORY PROG RUN
  319.                   : these options are the same as the equivalent options
  320.                     in the control file. When one of these options is
  321.                     given, the corresponding control file options are
  322.                     ignored.
  323.     LIST          : Do not give help, but list all items that correspond
  324.                     with the given <Class> and <Name>.
  325.  
  326.   examples:
  327.  
  328.     Help AllocMem
  329.       gives help about the EXEC function 'AllocMem' (if your help-files and
  330.       control file are correct)
  331.  
  332.     Help NewExec,AllocMem
  333.       will give help about the EXEC function 'AllocMem' in class 'NewExec'.
  334.       (class 'NewExec' could for example contain all additions to the
  335.       'AllocMem' function in 2.0)
  336.  
  337.     Help AllocMem run memory ppmore
  338.       gives help about 'AllocMem'. HELP will run 'PPMore'. Because we used
  339.       the 'memory' option, there will be no temporary file.
  340.       Note that you can only use the 'memory' option if you have PPMore
  341.       1.3 or later.
  342.  
  343.  
  344. Global example
  345. --------------
  346.  
  347.   Suppose that I have 3 help-files, each one containing 2 help items.
  348.  
  349.     Helpfile1:
  350.       | command list
  351.       |    ... (help for list command)
  352.       | command dir
  353.       |    ... (help for dir command)
  354.  
  355.     Helpfile2:
  356.       | command copy
  357.       |    ... (help for copy)
  358.       | move
  359.       |    ... (help for move)
  360.  
  361.     Helpfile3:
  362.       | command delete
  363.       |    ... (help for delete)
  364.       | command format
  365.       |    ... (help for format)
  366.  
  367.   Fine,... I notice that each help item (like 'list','dir','copy',...) is
  368.   the second word, but I didn't realize this wasn't the case with 'move' !
  369.   I must add marks to the help-files because every help-file contains 2
  370.   help items.
  371.  
  372.     Helpfile1:
  373.       | @command list
  374.       |    ... (help for list command)
  375.       | ===
  376.       | @command dir
  377.       |    ... (help for dir command)
  378.       | ===
  379.  
  380.     Helpfile2:
  381.       | @command copy
  382.       |    ... (help for copy)
  383.       | ===
  384.       | @move
  385.       |    ... (help for move)
  386.       | ===
  387.  
  388.     Helpfile3:
  389.       | @command delete
  390.       |    ... (help for delete)
  391.       | ===
  392.       | @command format
  393.       |    ... (help for format)
  394.       | ===
  395.  
  396.   (Strange, I still didn't see that 'move' is not the second word !)
  397.   First I am going to crunch all help-files with the PowerPacker CLI
  398.   command.
  399.   So I type:
  400.  
  401.     1> crunch HelpFile#? ram:
  402.  
  403.   All my help-files are on the ram disk.
  404.  
  405.     1> dir ram:
  406.       |     t (dir)
  407.       |  helpfile1.pp                   helpfile2.pp
  408.       |  helpfile3.pp
  409.  
  410.   Now I archive them.
  411.  
  412.     1> arcfiles ram:#? to ram:HelpFiles.ppa
  413.     1> delete ram:#?.pp
  414.     1> dir ram:
  415.       |     t (dir)
  416.       |  HelpFiles.ppa
  417.  
  418.   Everything is going fine. Let's make a control file.
  419.  
  420.     1> makehelp ram:HelpFiles.ppa s:Help.File word 2 class Commands
  421.  
  422.   I have made 6 help items in class 'Commands'
  423.  
  424.     1> type s:Help.File
  425.       | #FILE ram:HelpFiles.ppa
  426.       | #CLASS Commands
  427.       | delete | * | 1 | ram:helpfile3.pp
  428.       | format | * | 80 | ram:helpfile3.pp
  429.       | list | * | 138 | ram:helpfile1.pp
  430.       | dir | * | 81 | ram:helpfile1.pp
  431.       | copy | * | 125 | ram:helpfile2.pp
  432.       | this | * | 98 | ram:helpfile2.pp
  433.  
  434.   Oops ! Something went wrong ! I didn't need a help-item named 'this' !
  435.   But this is no problem. Simply edit 's:Help.File' and change
  436.   'this' to 'move'.
  437.   So everything is allright. Let's try it.
  438.  
  439.     1> help del
  440.       | command delete
  441.       |    ... (help for delete)
  442.  
  443.   There are still two things I have to do. First I want to put the archive
  444.   'HelpFiles.ppa' on my disk, because it won't live very long on my ram disk.
  445.  
  446.     1> copy ram:HelpFiles.ppa df0:
  447.  
  448.   Now I change the FILE option in 's:Help.File'.
  449.   I add two other lines because I want the help output in the PPMore window.
  450.  
  451.     1> type s:Help.File
  452.       | #FILE df0:HelpFiles.ppa                <<<
  453.       | #MEMORY PPMore                         <<<
  454.       | #RUN                                   <<<
  455.       | #CLASS Commands
  456.       | delete | * | 1 | ram:helpfile3.pp
  457.       | format | * | 80 | ram:helpfile3.pp
  458.       | list | * | 138 | ram:helpfile1.pp
  459.       | dir | * | 81 | ram:helpfile1.pp
  460.       | copy | * | 125 | ram:helpfile2.pp
  461.       | this | * | 98 | ram:helpfile2.pp
  462.  
  463.   Everything is ready !
  464.  
  465.  
  466. ==============================================================================
  467.  
  468.                        End of Quick HELP 2.0 document
  469.  
  470. ==============================================================================
  471.